@import url("https://fonts.googleapis.com/css?family=Droid+Sans+Mono");
* {
  box-sizing: border-box;
}

@font-face {
	font-family: "gluqlo";
	src: url("gluqlo.ttf") format("truetype");
}

body {
  margin: 0;
  overflow: hidden;
}

#root {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  position: relative;
  width: 100%;
  min-height: 100vh;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  background-color: #000;
}

header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  position: relative;
}
header h1 {
  font-family: 'gluqlo', 'Oswald', sans-serif;
  font-weight: lighter;
  text-transform: uppercase;
  letter-spacing: 10px;
  color: white;
}

.flipClock {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
}

.flipUnitContainer {
  display: block;
  position: relative;
  width: 500px;
  height: 500px;
  -webkit-perspective-origin: 50% 50%;
          perspective-origin: 50% 50%;
  -webkit-perspective: 1500px;
          perspective: 1500px;
  background-color: #0f0f0f;
  border-radius: 35px;
  margin:10px;
}

.upperCard, .lowerCard {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  position: relative;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: 100%;
  height: 50%;
  overflow: hidden;
  /*border: 10px solid black;*/
}
.upperCard span, .lowerCard span {
  font-size: 500px;
  font-family: 'gluqlo', 'Oswald', sans-serif;
  font-weight: bold;
  color: #BABABA;
  width: -webkit-fill-available;
  text-align: center;
}

.ampm {
  font-size: 50px;
  font-family: 'gluqlo', 'Oswald', sans-serif;
  font-weight: bold;
  color: white;
  position: absolute;
  left: 10px;
}

.lowerCard .ampm, .PM .ampm{
  bottom: 54px;
}

.upperCard .ampm, .AM .ampm{
  top: 54px;
}

.upperCard {
  -webkit-box-align: end;
      -ms-flex-align: end;
          align-items: flex-end;
  border-bottom: 1px solid black;
  border-top-left-radius: 35px;
  border-top-right-radius: 35px;
}
.upperCard span {
  -webkit-transform: translateY(50%);
          transform: translateY(50%);
}

.lowerCard {
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
  border-top: 1px solid black;
  border-bottom-left-radius: 35px;
  border-bottom-right-radius: 35px;
}
.lowerCard span {
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
}

.flipCard {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  position: absolute;
  left: 0;
  width: 500px;
  height: 250px;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}

.flipCard span {
  font-family: 'gluqlo', 'Oswald', sans-serif;
  font-size: 500px;
  font-weight: bold;
  color: #BABABA;
  width: -webkit-fill-available;
  text-align: center;
}
.flipCard.unfold {
  top: 50%;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
  -webkit-transform-origin: 50% 0%;
          transform-origin: 50% 0%;
  -webkit-transform: rotateX(180deg);
          transform: rotateX(180deg);
  background-color: #0f0f0f;
  border-bottom-left-radius: 35px;
  border-bottom-right-radius: 35px;
  /*border: 10px solid black;*/
  border-top: 1px solid black;
}
.flipCard.unfold span {
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
}
.flipCard.fold {
  top: 0%;
  -webkit-box-align: end;
      -ms-flex-align: end;
          align-items: flex-end;
  -webkit-transform-origin: 50% 100%;
          transform-origin: 50% 100%;
  -webkit-transform: rotateX(0deg);
          transform: rotateX(0deg);
  background-color: #0f0f0f;
  border-top-left-radius: 35px;
  border-top-right-radius: 35px;
  /*border: 10px solid black;*/
  border-bottom: 1px solid black;
}
.flipCard.fold span {
  -webkit-transform: translateY(50%);
          transform: translateY(50%);
}

.fold {
  -webkit-animation: fold 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0s 1 normal forwards;
          animation: fold 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0s 1 normal forwards;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
}

.unfold {
  -webkit-animation: unfold 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0s 1 normal forwards;
          animation: unfold 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0s 1 normal forwards;
  -webkit-transform-style: preserve-3d;
          transform-style: preserve-3d;
}

@-webkit-keyframes fold {
  0% {
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
  100% {
    -webkit-transform: rotateX(-180deg);
            transform: rotateX(-180deg);
  }
}

@keyframes fold {
  0% {
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
  100% {
    -webkit-transform: rotateX(-180deg);
            transform: rotateX(-180deg);
  }
}
@-webkit-keyframes unfold {
  0% {
    -webkit-transform: rotateX(180deg);
            transform: rotateX(180deg);
  }
  100% {
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
}
@keyframes unfold {
  0% {
	  transform-style: preserve-3d;
    -webkit-transform: rotateX(180deg);
            transform: rotateX(180deg);
  }
  100% {
	  transform-style: preserve-3d;
    -webkit-transform: rotateX(0deg);
            transform: rotateX(0deg);
  }
}
